local skynet = require "skynet"
local socket     = require "skynet.socket"
local netpack    = require "skynet.netpack"
local msgpack    = require "msgpack"
local cjson      = require "cjson"

local game = {}


function game.ping(cmd)
    return { c = "game", m = "pong", data = { errcode = 0, errmsg = "", data = {} } }
end

function game.start(cmd)
    if not SERVICE then
        return { c = "game", m = "start", data = { errcode = 10001, errmsg = "启动游戏失败", data = {} } }
    end
    local ok = pcall(skynet.call,SERVICE,"lua","start_task")
end


return game
